{extend name="page_base" /} {block name="seo"}
<title>申请收录 - {$site_config['seo_title']}</title>
<meta name="keywords" content="{$site_config['seo_keyword']}">
<meta name="description" content="{$site_config['seo_description']}">
{/block}
{block name="css"}

{/block}
{block name="main"}
<div class="title">
    <h3>申请收录</h3>
</div>
<div class="thisContent layui-clear">
    <form class="send layui-form">
        <input type="text" name="name" lay-verify="min_2" placeholder="网站标题"
               style="margin:0;float:left;width:48%;"/>
        <input type="text" name="link" lay-verify="link" placeholder="网站域名以http(s)://开头"
               style="margin:0;float:left;width:48%;margin-left:4%"/>

        <textarea name="remake" lay-verify="min_10_max_300" placeholder="您想给站长说的话"
                  style="margin-top:20px;height:100px;float:left;"></textarea>
        <input type="text" name="qq" lay-verify="min_2"  maxlength="11" placeholder="您的QQ号"
               style="margin-top:20px;float:left;width:calc(100% - 288px);"/>
        <input name="captcha" lay-verify="required" maxlength="4" type="text" placeholder="验证码"
               style="margin-top:20px;float:left;width:120px;margin-left:4%"/>
        <img src="{:url('index/page/captcha')}?'+Math.random();" title="点击可刷新验证码"
             onclick="this.src='{:url('index/page/captcha')}?'+Math.random();" id="img_code"
             style="margin-top:20px;width:144px;height:45px;cursor:pointer">
        <input type="submit" lay-submit lay-filter="save_btn" value="提 交" class="btn"
               style="margin-top:30px;"/>
    </form>
    <div class="tj">
        收录条件：<br/>
        1、百度权重{$site_config['apply_friendly_baidu_pr']}以上<br/>
        2、正规网站，不违反中国法律的<br/>
        3、网站内容必须完善，不能是新网站<br/>
    </div>
</div>
{/block}
{block name="script"}
<script>
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer;
        var form = layui.form;

        form.verify({
            link: [
                /(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/
                , '小可爱，网址不正确哦,(带上http或者https)'
            ],
            min_2: [
                /^.{2,20}$/,
                '请输入2到20位字符'
            ],
            min_10_max_300: [
                /^.{10,300}$/,
                '请输入10到300位字符'
            ]
        });
        form.on('submit(save_btn)', function (data) {
            request({
                data: {
                    data: data.field,
                    post_type: 'add_apply'
                },
                done: function () {
                    $("#img_code").click();
                }

            })
            return false;
        });
    });

</script>
{/block}